package com.tianxu.hadoop.utils;

import com.sun.xml.internal.xsom.impl.util.Uri;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;

import java.net.URI;

public class FileSystemUtil {
    private static FileSystem fs =null;
    private static final String HDFS_PATH="hdfs://10.211.55.5:9000/";
    static{
        try{
            Configuration conf = new Configuration();
            conf.set("dfs.replication", "1");
            fs = FileSystem.get(new URI(HDFS_PATH),conf,"tianxu");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static FileSystem getFS(){
        return fs;
    }

    /* 田旭*/
    /*修改的内容*/

}
